package com.atguigu.practice;

import java.util.Scanner;

public class ReversePartNode2 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt(); //节点个数
        int[] a=new int[n];
        for(int i=0;i<n;i++){
            a[i]=scanner.nextInt();
        }
        int L=scanner.nextInt();
        int R=scanner.nextInt();
        for(int left=L-1,right=R-1;left<=right;left++,right--){
            int tmp=a[left];
            a[left]=a[right];
            a[right]=tmp;
        }
        for(int i=0;i<n;i++){
            System.out.print(a[i]+" ");
        }
    }
}
